package com.itheima.utils;

import lombok.Data;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;


/**
 * @author huangzelnag
 * @create 2022-05-10
 */

@Component
public class ConstUtils implements InitializingBean {

    @Value("${aliyun.endpoint}")
    private String endpoint;

    @Value("${aliyun.keyid}")
    private String keyid;

    @Value("${aliyun.keysecret}")
    private String keysecret;

    @Value("${aliyun.bucketname}")
    private String bucketname;

    @Value("${aliyun.url}")
    private String url;


    public static String END_POINT;
    public static String KEY_ID;
    public static String KEY_SECRET;
    public static String BUCKET_NAME;
    public static String URL_NAME;



    @Override
    public void afterPropertiesSet() throws Exception {
        END_POINT=endpoint;
        KEY_ID=keyid;
        KEY_SECRET=keysecret;
        BUCKET_NAME=bucketname;
        URL_NAME=url;
    }
}